package cn.getech.data.development.constant;

import lombok.Getter;

@Getter
public enum RequetTypeEnum {
    GET(1,"GET"),
    POST(2,"POST");

    RequetTypeEnum(Integer code, String name) {
        this.name = name;
        this.code=code;
    }
    private String name;
    private Integer code;
    public static RequetTypeEnum ObjOf(Integer code) {
        if (code == null) {
            return null;
        } else {
            for (RequetTypeEnum s : RequetTypeEnum.values()) {
                if (s.getCode() == code) {
                    return s;
                }
            }
            return null;
        }
    }
}
